package com.pet.system.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 * 系统-资源表(菜单、按钮)
 *
 * @author Centaurea
 */
@ApiModel(value = "com-pet-system-domain-entity-SysResource")
@Data
@NoArgsConstructor
@TableName(value = "sys_resource")
public class SysResource implements Serializable {
  private static final long serialVersionUID = 3577152618087303216L;
  public static final String COL_ID = "id";
  public static final String COL_PARENT_ID = "parent_id";
  public static final String COL_NAME = "name";
  public static final String COL_ICON = "icon";
  public static final String COL_URL = "url";
  public static final String COL_PATH = "path";
  public static final String COL_HIDE = "hide";
  public static final String COL_PERMISSION = "permission";
  public static final String COL_SORT = "sort";
  public static final String COL_TYPE = "type";
  public static final String COL_STATUS = "status";

  /** ID主键 */
  @TableId(value = "id", type = IdType.AUTO)
  @ApiModelProperty(value = "ID主键")
  private Integer id;

  /** 父资源ID */
  @TableField(value = "parent_id")
  @ApiModelProperty(value = "父资源ID")
  private Integer parentId;

  /** 资源名称 */
  @TableField(value = "`name`")
  @ApiModelProperty(value = "资源名称")
  private String name;

  /** 图标 */
  @TableField(value = "icon")
  @ApiModelProperty(value = "图标")
  private String icon;

  /** 链接地址 */
  @TableField(value = "url")
  @ApiModelProperty(value = "链接地址")
  private String url;

  /** 组件路径 */
  @TableField(value = "`path`")
  @ApiModelProperty(value = "组件路径")
  private String path;

  /** 隐藏状态 1：隐藏，0：不隐藏 */
  @TableField(value = "hide")
  @ApiModelProperty(value = "隐藏状态  1：隐藏，0：不隐藏")
  private Integer hide;

  /** 权限标识 */
  @TableField(value = "permission")
  @ApiModelProperty(value = "权限标识")
  private String permission;

  /** 排序序号 */
  @TableField(value = "sort")
  @ApiModelProperty(value = "排序序号")
  private Integer sort;

  /** 资源类型 1: 菜单，2：按钮 */
  @TableField(value = "`type`")
  @ApiModelProperty(value = "资源类型  1: 菜单，2：按钮")
  private Integer type;

  /** 资源状态 1：可用，0：禁用 */
  @TableField(value = "`status`")
  @ApiModelProperty(value = "资源状态  1：可用，0：禁用")
  private Integer status;
}
